module.exports = {
	name: 'order',
	data() {
		return {
			receiDisabled: !this.canRecevice,
			rejecDisabled: !this.canReject
		}
	},
	props: {
		newOrder: {
			type: Object,
			default: {}
		},
		isEmptyBarry:{
			type:Boolean,
			default:false
		},
		canRecevice: {
			type: Boolean,
			default: true
		},
		canReject: {
			type: Boolean,
			default: true
		},
		time: {
			default: new Date().getTime()
		}
	},
	methods: {
		/**
	     * 接收事件
	     */
		onRecevice(id) {
			this.$emit('recevice', id);
		},
		/**
	     * 拒绝事件
	     */
		onReject(id) {
			this.$emit('reject', id)
		},
		/**
	     * 改变状态
	     */
		changeStatus(name, status) {
			this[name] = status;
		}
	},
	created() {
	}
}